import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import { resolve } from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  resolve: {
    alias: {
      "@": resolve(__dirname, "src")
    }
  },
  css: {
    preprocessorOptions: {
      scss: {
        // Suppress Sass deprecation warnings
        silenceDeprecations: ['legacy-js-api', 'import', 'global-builtin'],
        quietDeps: true
      }
    }
  },
  build: {
    rollupOptions: {
      external: ['@dcloudio/uni-ui/lib/uni-checkbox/uni-checkbox.vue']
    }
  }
});
